/*
 * 描述: 封装组件库
 * 作者: 柯基与佩奇
 * 日期: 2020-04-18
 */

import business from './companySummary/business' // 业务范围
import talent from './companySummary/talent' // 人才队伍
import wordCloud from './companySummary/wordCloud' // 产品热词
import zichan from './companySummary/zichan'
import centermap from './companySummary/centermap'

const components = {
  business,
  talent,
  wordCloud,
  zichan,
  centermap,
};

const install = (Vue = {}) => {
  if (install.installed) return;
  Object.keys(components).forEach(component => {
    Vue.component(components[component].name, components[component]);
  });

  install.installed = true;
};

install.installed = false;

if (typeof window !== "undefined" && window.Vue) {
  install(window.Vue);
  install.installed = true;
}

const Vcomp = {
  ...components,
  install
};


export default Vcomp
